package com.lhl.mq.mqServer.mapper;

import com.lhl.mq.mqServer.core.Binding;
import com.lhl.mq.mqServer.core.Exchange;
import com.lhl.mq.mqServer.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MetaMapper {
    //提供三个核心方法
    void createQueueTable();
    void createExchangeTable();
    void createBindingTable();

    //针对上面基本概念，进行 查找 插入 删除
    List<MSGQueue> selectAllQueue();
    void insertQueue(MSGQueue queue);
    void deleteQueue(String name);

    List<Exchange> selectAllExchange();
    void insertExchange(Exchange exchange);
    void deleteExchange(String name);

    List<Binding> selectAllBinding();
    void insertBinding(Binding binding);
    void deleteBinding(Binding bing);


}
